import React,{useState,useEffect} from "react"

const Counter =()=>{
    useEffect(()=>{
        console.log(count);
    })

    
    const [count,setCount] =useState(0)
    return(
        <div>
            <p>{count}</p>
            <button onClick={()=>setCount(count+1)}>点我</button>
        </div>
    )
}
export default Counter